package com.yxj.Practice5;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.UUID;

public class Server {
    public static void main(String[] args) throws IOException {
        //1.
        ServerSocket ss = new ServerSocket(10000);

        while (true) {
            //2.等待客户来连接
            Socket socket = ss.accept();

            //开启一条线程
            //一个用户就对应服务器的一条线程
            new Thread(new MyRunnable(socket)).start();
        }


    }
}
